<script type="text/javascript" src="/js/swfupload.js"></script>
<script type="text/javascript" src="js/swfupload.queue.js"></script>
<script type="text/javascript" src="js/fileprogress.js"></script>
<script type="text/javascript" src="js/handlers.js"></script>
<script type="text/javascript">
	var upload1;
	window.onload = function() {
		upload1 = new SWFUpload({
		upload_url: "<?=self::_makeURL($this->app,$this->controller,'send_batch_photo',array('cid'=>_('cid',1)))?>",
		file_post_name : "Filedata",
		post_params: {
				"PHPSESSID" : "<?php echo session_id(); ?>",
				'chapter_id':"<?=$this->ret['chapterinfo']['id']?>",
				'cartoon_id':"<?=$this->ret['chapterinfo']['cartoon_id']?>"
		},
		use_query_string : false,
		requeue_on_error : false,
		assume_success_timeout : 0,
		file_size_limit : "10 MB",	// 100MB
		file_types : "*.jpg;*.gif;*.png;*.jpeg",
		file_types_description : "All Files",
		file_upload_limit : "0",
		file_queue_limit : "0",
		file_dialog_start_handler : fileDialogStart,
		file_queued_handler : fileQueued,
		file_queue_error_handler : fileQueueError,
		file_dialog_complete_handler : fileDialogComplete,
		upload_start_handler : uploadStart,
		upload_progress_handler : uploadProgress,
		upload_error_handler : uploadError,
		upload_success_handler : uploadSuccess,
		upload_complete_handler : uploadComplete,
		button_image_url : "/images/btn_upload_new.png",
		button_disabled : false, 
		button_cursor : SWFUpload.CURSOR.HAND, 
		button_window_mode : SWFUpload.WINDOW_MODE.TRANSPARENT,
		button_text_style : ".redText { color: #FF0000; }", 
		button_text_left_padding : 3, 
		button_text_top_padding : 2,
		
		button_placeholder_id : "spanButtonPlaceholder1",
		button_width: 61,
		button_height: 22,
		button_action  : SWFUpload.BUTTON_ACTION.SELECT_FILES,		
		flash_url : "/images/swfupload.swf",		
		custom_settings : {
			progressTarget : "fsUploadProgress1",
			cancelButtonId : "btnCancel1"
		},
		debug: false
	});
}
</script>